package ${package_name}.model;
import com.evada.inno.common.domain.BaseModel;
import com.evada.inno.common.listener.ICreateListenable;
import com.evada.inno.common.listener.IDeleteListenable;
import com.evada.inno.common.listener.IModifyListenable;
import org.hibernate.annotations.Where;
import javax.persistence.*;
import java.util.Date;
import java.io.Serializable;

/**
* ${table_annotation} model
* @author ${author}
* @date ${date}
*/
//@Entity
//@Table(name="${table_name_small}")
//@Where(clause = "status > '0'")
//@Inheritance(strategy= InheritanceType.SINGLE_TABLE)
public class ${table_name} implements Serializable {

<#if model_column?exists>

    <#list model_column as model>
    /**
    *${model.columnComment!}
    */
        <#if (model.columnType = 'VARCHAR' || model.columnType = 'CHAR' || model.columnType = 'LONGTEXT' || model.columnType = 'MEDIUMTEXT' || model.columnType = 'TINYTEXT' || model.columnType = 'TEXT')>
    @Column(name = "${model.columnName}",columnDefinition = "VARCHAR")
    private String ${model.changeColumnName?uncap_first};

        </#if>
        <#if (model.columnType = 'INT' || model.columnType = 'INTEGER' || model.columnType = 'TINYINT' || model.columnType = 'SMALLINT' || model.columnType = 'MEDIUMINT' )>
    @Column(name = "${model.columnName}",columnDefinition = "INTEGER")
    private Integer ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'BIGINT' >
    @Column(name = "${model.columnName}",columnDefinition = "BIGINT")
    private Long ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'FLOAT' >
    @Column(name = "${model.columnName}",columnDefinition = "FLOAT")
    private Float ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'DOUBLE' >
    @Column(name = "${model.columnName}",columnDefinition = "DOUBLE")
    private Double ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'DECIMAL' >
    @Column(name = "${model.columnName}",columnDefinition = "DECIMAL")
    private BigDecimal ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'BIT' >
    @Column(name = "${model.columnName}",columnDefinition = "BIT")
    private Boolean ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'TIMESTAMP' >
    @Column(name = "${model.columnName}",columnDefinition = "TIMESTAMP")
    private Timestamp ${model.changeColumnName?uncap_first};

        </#if>
        <#if model.columnType = 'DATE' || model.columnType = 'DATETIME'>
    @Column(name = "${model.columnName}",columnDefinition = "DATE")
    private Date ${model.changeColumnName?uncap_first};

        </#if>
    </#list>
</#if>

<#if model_column?exists>

    <#list model_column as model>
        <#if (model.columnType = 'VARCHAR' || model.columnType = 'CHAR' || model.columnType = 'LONGTEXT' || model.columnType = 'MEDIUMTEXT' || model.columnType = 'TINYTEXT' || model.columnType = 'TEXT')>
    public String get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(String ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if (model.columnType = 'INT' || model.columnType = 'INTEGER' || model.columnType = 'TINYINT' || model.columnType = 'SMALLINT' || model.columnType = 'MEDIUMINT' )>
    public Integer get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Integer ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'BIGINT' >
    public Long get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Long ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
        <#if model.columnType = 'FLOAT' >
    public Float get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Float ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'DOUBLE' >
    public Double get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Double ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'DECIMAL' >
    public BigDecimal get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(BigDecimal ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'BIT' >
    public Boolean get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Boolean ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'TIMESTAMP' >
    public Timestamp get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Timestamp ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
        <#if model.columnType = 'DATE' || model.columnType = 'DATETIME'>
    public Date get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Date ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }

        </#if>
    </#list>

</#if>

}